package com.one.odf.service;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.one.odf.model.*;
import com.one.odf.util.XmlUtils;
import lombok.extern.log4j.Log4j2;
import org.apache.cxf.endpoint.Client;
import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import javax.jws.WebService;

/**
 * @description:
 * @author: zero
 * @date: 2019/10/30
 */
@WebService(name = "odfService",
        targetNamespace = "http://service.odf.one.com",
        endpointInterface = "com.one.odf.service.OdfService"
)
@Service
@Log4j2
public class OdfServiceImpl implements OdfService {
    private Logger logger = LoggerFactory.getLogger(this.getClass());

    @Override
    public String OdfBody(String odfBody) {
        logger.info("==================:{}",odfBody);
        BodyType bodyType = (BodyType) XmlUtils.convertXmlStrToObject(BodyType.class,odfBody);
        logger.info("==================:{}",bodyType);
        return "200";
    }

}
